package com.scau.service;

import com.scau.dto.CashReFrom;
import com.scau.dto.Order;
import com.scau.dto.PayForm;
import com.scau.exception.GoodsStockException;
import com.scau.pojo.EWallet;
import com.scau.pojo.OrderItem;
import com.scau.pojo.PaymentFlow;

import javax.print.attribute.standard.OrientationRequested;
import java.util.List;

public interface IEWalletService {
    //添加电子钱包
    public void addWallet(EWallet eWallet);
    //获取电子钱包
    public EWallet getWallet(String payid);
    //修改电子钱包
    public int updateWallet(EWallet eWallet);
    //支付
    public String pay(PayForm payForm) throws GoodsStockException;
    //
    public List<Order> ListByBuyer(String buyer_name);
    //
    public List<OrderItem> ListBySeller(String seller_name);
    //添加流水
    public void addPaymentFlow(PaymentFlow paymentFlow);

    public EWallet getWalletByUsername(String username);

    //借卖方查看流水
    public List<PaymentFlow> getPaymentFlowByFromId(String username);

    //品牌商查看流水
    public List<PaymentFlow> getPaymentFlowByToId(String username);

    //提现 充值
    //flaf = 1 代表提现  flag = 2 表示充值
    public int CashOutOrRechange(CashReFrom cashReFrom, int flag);

    //取消订单
    public void CancelOreder();

    //提现 提现 审核通过
    //充值flag = 1
    //提现flag = 2
    public int CashOutOrRechangePass(String id,int flag);

}

